﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using DataAccess;

namespace tracnghiemonline2
{
    public partial class AdminMTP : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["admin_id"] == null)
            {
                Response.Redirect("/Login");
            }
        }
        public bool check_Role(string s)
        {
            bool check = false;
            if(!String.IsNullOrEmpty(s.Trim()))
            {
                string[] split = s.Split(',');
                for(int i=0;i<split.Length;i++)
                {
                    if (split[i] == Session["admin_id"].ToString())
                        check = true;
                }
            }
            return check;
        }
    }
}